package com.xhwl.logistics.converter.mapstruct;


import com.xhwl.logistics.dto.http.ParkingLotInfoChuangXiangDTO;
import com.xhwl.logistics.entity.VehicleParkingLot;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.NullValueMappingStrategy;


/**
 * 将第三方的车场信息转换为中台的车场信息
 */
@Mapper(componentModel = "spring", nullValueMappingStrategy = NullValueMappingStrategy.RETURN_DEFAULT)
public interface VehicleParkingLotThirdConverter {

    /**
     * 将创享车场信息转换为中台车场信息
     */
    @Mapping(target = "parkingLotName",source = "parkingLotInfoChuangXiangDTO.parkingNume")
    @Mapping(target = "carportTotalNumber",source = "parkingLotInfoChuangXiangDTO.carBitum")
    @Mapping(target = "parkId",source = "parkingLotInfoChuangXiangDTO.parkingId")
    VehicleParkingLot chuangXiangtoVehicleParkingLot(ParkingLotInfoChuangXiangDTO parkingLotInfoChuangXiangDTO, Integer projectId);
}
